package site.assad.anno;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2017/11/29 20:25
 * Description: 演示注解注入
 */
@Scope("prototype")
@Component("user")
public class User {
    private String name;
    private int age;
    private String city;

    public User(String name, int age, String location) {
        this.name = name;
        this.age = age;
        this.city = location;
    }

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String toString(){
        return "name:"+name+"/age:"+age+"/city:"+city;
    }
}


